// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from "vue";
import App from "./App";
import router from "./router";
import store from "./vuex/strore";
//引入element ui
import ElementUI from "element-ui";
import "element-ui/lib/theme-chalk/index.css";
// 引入icon
import "./assets/icon/iconfont.css";
//引入echarts
import * as echarts from "echarts";
//引入 mavon-editor
import mavonEditor from 'mavon-editor'
import 'mavon-editor/dist/css/index.css'
// 过滤器
import * as custom from "./utils/util";
import axios from "axios";
import VueAMap from "vue-amap";
import { lazyAMapApiLoaderInstance } from 'vue-amap';
Vue.use(VueAMap);
VueAMap.initAMapApiLoader({
  key: '04c4a1e59d5e6ddaf33ec7eca29afab1',
  plugin: ['AMap.Scale', 'AMap.OverView', 'AMap.ToolBar', 'AMap.MapType', 'AMap.PlaceSearch', 'AMap.Geolocation', 'AMap.Geocoder'],
  v: '1.4.4',
  uiVersion: '1.0'
})
lazyAMapApiLoaderInstance.load().then(() => {
  // your code ...
  this.map = new AMap.Map('amapContainer', {
    center: new AMap.LngLat(121.59996, 31.197646)
  });
});
Vue.config.productionTip = false;
//注册vuex
Vue.prototype.$store = store;
//使用 ElementUI
Vue.use(ElementUI);
//使用 mavonEditor
Vue.use(mavonEditor)
//引入axios
Vue.prototype.$axios = axios;
//使用echarts
Vue.prototype.$echarts = echarts;

/* eslint-disable no-new */

new Vue({
  el: "#app",
  store,
  router,
  components: { App },
  template: "<App/>"
});
